package calc

abstract case class Token[T]()
case class OpenParen[T]() extends Token[T]
case class CloseParen[T]() extends Token[T]
case class Number[T](val value: String) extends Token[T]

abstract case class Operator[T]() extends Token[T]{
  def <(t:Token[T]) = t match {
    case Operator() => true
    case _ => false
  }
}
case class UMinus[T]() extends Operator[T]
case class Minus[T]() extends Operator[T]
case class Plus[T]() extends Operator[T]

abstract case class MulDiv[T]() extends Operator[T]{
  override def <(t:Token[T]) = t match {
    case UMinus() => true
    case Multiply() => true
    case Divide() => true
    case _ => false
  }
}

case class Multiply[T]() extends MulDiv[T]

case class Divide[T]() extends MulDiv[T]
